// Only in player setup
diag_log "Player_Setup.sqf";

waituntil {X_INIT && alive player};

if (isnil "DPlayerIsSetUp") then {
	// Here comes the code which has to be executed only once.
	_EHkilledIdx = player addEventHandler ["killed", {diag_log "Event Killed"; _this execVM "base\client\player_setup.sqf";}];
	diag_log format["Killed Event Setup: %1",_EHkilledIdx];
	_EHkilledIdx = player addEventHandler ["killed", {diag_log "Event Killed"; _this execVM "base\client\player_spawn.sqf";}];
	diag_log format["Killed Event Spawn: %1",_EHkilledIdx];

	DPlayerIsSetUp = true;
};
